#ifndef AKTAZO_H
#define AKTAZO_H

#include <fstream>
#include <vector>

///header file to implement states of Aktazo
///based on UML State Machine diagram

#include "aktazo_exceptions.h"
#include "file_io_exceptions.h"
#include "document.h"

class Aktazo
{
	///intended use: only one instance
	private:
		std::ifstream* f_in;
		std::ofstream* f_out;
		const std::string filename;
		///the same data file is handled differentely when reading and when writing

		std::vector<Document*> *v_ptr;
		///to store all records in a vector

		unsigned int v_old_size;
		///to strore the number of the records read from input file

		unsigned int v_new_size;
		///to strore the number of all the records (read from input file and
		///from user input

		void load_data() throw(File_IO_exceptions);
		///initial activities: loading data from input file to vector

		void run() throw();
		///main activities: handling menu choices

		void save_data() throw(File_IO_exceptions);
		///finishing activities: saving only the new records

	public:

		Aktazo() throw(Aktazo_exceptions);

		~Aktazo() throw();

};

#endif
